package org.chench.test.gatewayzuul.filter;

import ch.qos.logback.core.net.SyslogOutputStream;
import com.netflix.zuul.ZuulFilter;
import org.springframework.stereotype.Component;

/**
 * Desc: 检查消息头是否有auth字段
 * Name: org.chench.test.gatewayzuul.filter.AuthHeaderFilter
 * Author: chench9@lenovo.com
 * Date: 2018/4/26 16:29
 **/
@Component
public class AuthHeaderFilter extends ZuulFilter {
    @Override
    public String filterType() {
        return "pre";
    }

    @Override
    public int filterOrder() {
        return 10;
    }

    @Override
    public boolean shouldFilter() {
        return true;
    }

    @Override
    public Object run() {
        System.out.println("检查消息头");
        return null;
    }
}
